package com.antball.dd.bridge;

import com.antball.dd.bridge.sendmsg.*;

public class Main {

    public static void main(String[] args) {
        AbstractControl commonControl=new OldTvControl(new HesenTv());
        commonControl.Onoff();
        commonControl.nextChannel();
        commonControl.nextChannel();
        commonControl.preChannel();
        commonControl.Onoff();

        commonControl=new OldTvControl(new TclTv());
        commonControl.Onoff();
        commonControl.preChannel();
        commonControl.preChannel();
        commonControl.preChannel();
        commonControl.Onoff();


        NewTvControl newHesenControl=new NewTvControl(new HesenTv());
        newHesenControl.Onoff();
        newHesenControl.nextChannel();
        newHesenControl.setChannel(9);
        newHesenControl.setChannel(28);

        //特有的方法
        newHesenControl.Back();
        newHesenControl.Onoff();



        //////////////////////////////////////

        //创建具体的实现对象
        SendMessageImplementor impl = new SendSmsSendMessage();

        //创建普通消息对象
        AbstractMessage message = new CommonMessage(impl);
        message.sendMessage("加班申请速批","李总");

        //将实现方式切换成邮件，再次发送
        impl = new SendEmailSendMessage();
        //创建加急消息对象  加工成加急的消息内容
        UrgencyMessage urgencyMessage = new UrgencyMessage(impl);
        urgencyMessage.sendMessage("加班申请速批","李总");
        urgencyMessage.watch("msgId");

    }
}
